﻿@{
    var menu = ViewBag.Menu as IMenu;
}
<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        <i class="fa fa-home home-icon" style="font-size:20px;"></i>
        @if (menu != null)
        {
            foreach (IMenu item in (menu as IEntityTree).AllParents)
            {
                if (item.ID != 0)
                {
                    <li class="breadcrumb-item"><a href="@(item.Url!=null? Url.Content(item.Url):"#")">@item.DisplayName</a></li>
                }
            }
        }
        <li class="breadcrumb-item active" aria-current="page"><a href="@Url.Action("Index")">@(menu != null ? menu.DisplayName : ViewBag.Title)</a></li>
    </ol>
</nav>